package com.binyong.Util;

import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author binyong
 * @description：Redis工具类
 * @date 2025-07-21
 */
@Component
public class RedisUtil {

    @Resource
    private StringRedisTemplate redisTemplate;

    /**
     * 消息发送
     * @param channel
     * @param message
     */
    public void convertAndSend(String channel, Object message) {
        redisTemplate.convertAndSend(channel, message);
    }
}